﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.DataVisualization.Charting;

namespace WebSite.admin.Report
{
    public partial class FastLineChart : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public void DrawingGraph(string sTitle, string[] colorNames, string[] xNames, double[] yVal1, double[] yYal2, double[] yVal3)
        {

            lblName1.Text = colorNames[0];
            lblName2.Text = colorNames[1];
            lblName3.Text = colorNames[2];

            Chart1.Titles[0].Text = sTitle;

            Chart1.Series["Series1"].ChartType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), "FastLine");
            Chart1.Series["Series2"].ChartType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), "FastLine");
            Chart1.Series["Series3"].ChartType = (SeriesChartType)Enum.Parse(typeof(SeriesChartType), "FastLine");
            // Fill series data

            for (int i = 0; i < yVal1.Length; i++)
            {
                Chart1.Series["Series1"].Points.AddY(yVal1[i]);
                Chart1.Series["Series2"].Points.AddY(yYal2[i]);
                Chart1.Series["Series3"].Points.AddY(yVal3[i]);
            }


        }
    }
}